1. Field of the Invention
The present invention relates to a programmable controller equipped with a display function for displaying internal data processed by a control program without affecting the processing of the control program.
2. Description of the Background Art
A programmable controller (hereinafter referred to as a "PC") for program-controlling an object to be controlled lo may be equipped with at least one of a display and a printer, serving as a display device. The PC also may have a display control function which is operative to show on the display both internal data required for the run of a control program and the internal data resulting from such run, or to print such internal data on paper for monitoring.
FIG. 10 illustrates a configuration of a conventional PC equipped with a printer as a display device and a control function thereof. In the Figure, the flow directions of the internal data are indicated by arrows.
In FIG. 10, a PC unit 10 serves as a program control section. The unit includes a CPU 11 as a program processing unit (hereinafter referred to as the "program processing CPU") for running and processing a control program. CPU 11 controls all functions, including printing, and must access all programs in memory that are relevant to those functions. The unit also includes a memory 12 as an internal data storage (hereinafter referred to as the "internal data memory") for storing as the internal data of the PC both the data required for the run of the control program and the data resulting from such run. A print control unit 20 acts as a display control section and includes a print data output interface 21 for outputting the internal data in a print-compatible format to a printer 30, as mentioned later. The print control unit does not have a CPU but does include a buffer memory in the structure. The printer 30 is one several possible display units for printing the output from the print control unit 20.
In an operation of the PC, the program processing CPU 11 in the PC unit 10 runs the control program which is employed to control an object to be controlled (not illustrated). The control program includes a print program for printing program-control information on the printer 30 for monitoring purposes. When the program processing CPU 11 runs the control program, the desired internal data of the PC, which is described in the print program area of the internal data memory 12, is read out. The read data is converted into a desired format by the print program, output to the printer 30 via the print data output interface 21 of the print control unit 20, and printed by the printer 30.
The PC can employ several print formats (systems), each of which is described in the control program as a subprogram. The program processing CPU 11 outputs the internal data processed in accordance with the print format programmed in the control program, i.e. by processing the internal data and the data defining the print format, to the printer 30 via interface 21.
When such print processing is performed by the PC, a print processing program must be included in the PC control program and run by the program processing CPU 11. As a result, the selection of a print format becomes complicated. Furthermore, the print time per scan of the program as well as the PC program size increases in proportion to an increase in the amount of PC internal data to be printed. Thus, a large program control processing load is placed on the PC.
This same problem exists where the internal data is to be presented on a display. To perform the display processing, such as an indication on a display of data that is required for the run of a control program and data that results from such run, as internal data, for monitoring purposes by means of a conventional programmable controller that is configured as described above, a display processing program must be incorporated into the control program and run in the control unit thereof. As a result, the display format is complicated and the number of control program steps and the processing time of the control program are increased as the amount of the internal data to be displayed is increased. This adversely affects the efficient operation of the object to be controlled.
Where both a printing and display function are to be conducted, the complications, problems, processing time and load on the PC are further increased.